import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ArticleItem from './components/ArticleItem.vue'

import 'highlight.js/styles/default.css' // 代码高亮的样式

import { forMatTime } from './utils/time'
import {
  NavBar, Form, Field, Button, Tabbar,
  TabbarItem, Icon, Tab, Tabs, Cell, List
  , PullRefresh
  , ActionSheet
  , Dialog
  , popup
  , Row, Col, Badge, Search
  , Divider, Tag, CellGroup, Image
  , DatetimePicker
} from 'vant'

import 'amfe-flexible'
import './directive/index'
import './permission'
Vue.use(DatetimePicker)
Vue.prototype.forMatTime = forMatTime

Vue.use(Image)
Vue.use(Tag)
Vue.use(CellGroup)
Vue.use(Divider)
Vue.component('ArticleItem', ArticleItem)
Vue.use(Search)
Vue.use(Badge)
Vue.use(Row)
Vue.use(Col)

// 全局注册
Vue.use(Dialog)

Vue.use(ActionSheet)
Vue.use(popup)

Vue.use(PullRefresh)

Vue.use(List)

Vue.use(Cell)

Vue.use(Tab)
Vue.use(Tabs)

Vue.use(Icon)

Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(NavBar)
Vue.use(Form)
Vue.use(Field)
Vue.use(Button)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
